# myworld.c

#include <stdio.h>

int n, m, k, ans;
int arr[105][105];

int main()
{
    scanf("%d %d %d", &n, &m, &k);
    for(int i = 0; i < m; i++) {
        int x, y;
        scanf("%d %d", &x, &y);

        for(int j = 0; j < n; j++) {
            arr[x-1][j] = 1;
            arr[j][y-1] = 1;
        }

        arr[x-2][y-2] = 1;
        arr[x-2][y] = 1;
        arr[x][y-2] = 1;
        arr[x][y] = 1;
    }

    for(int i = 0; i < k; i++) {
        int o, p;
        scanf("%d %d", &o, &p);
        arr[o-1][p-1] = 1;
    }

    for(int i = 0; i < n; i++) {
        for(int j = 0; j < n; j++) {
            if(arr[i][j] == 0) {
                ans++;
            }
        }
    }

    printf("%d\n", ans);

    return 0;
}




# bomb.c
#include <stdio.h>

int n, m, x, y;
int arr1[105][105];
int arr2[105][105];

int main()
{
    scanf("%d %d %d %d", &n, &m, &x, &y);

    for(int i = 0; i < x; i++) {
        int x1, x2, y1, y2;
        scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
        for(int j = x1-1; j < x2; j++) {
            for(int k = y1-1; k < y2; k++) {
                arr1[j][k]++;
                arr2[j][k] = i+1;
            }
        }
    }

    for(int i = 0; i < y; i++) {
        int x, y;
        scanf("%d %d", &x, &y);

        if(arr1[x-1][y-1] == 0) {
            printf("N\n");
        }else{
            printf("Y %d %d\n", arr1[x-1][y-1], arr2[x-1][y-1]);
        }
    }

    return 0;
}










// myworld.c 答案
#include <iostream>

using namespace std;

int n, m, k;
bool g[105][105];  //1-->点亮
int x, y;

void light(int x, int y, int t) {
    for(int i = x-t; i <= x+t; i++) {
        for(int j = y-t; j <= y+t; j++) {
            if(i > n || i < 1 || j > n || j < 1) {
                continue;
            }else {
                g[i][j] = 1;
            }
        }
    }
}

void hb(int x, int y) { //计算能被火把点亮的坐标点
    light(x, y, 1);
    if(x+2 <= n) {
        g[x+2][y] = 1;
    }
    if(x-2 > 0) {
        g[x-2][y] = 1;
    }
    if(y+2 <= n) {
        g[x][y+2] = 1;
    }
    if(y-2 > 0) {
        g[x][y-2] = 1;
    }
}

void ys(int x, int y) { //计算能被萤石点亮的坐标点
    light(x, y, 2);
}

int count() {
    int cnt = 0;
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= n; j++) {
            if(g[i][j] == 0) {
                cnt++;
            }
        }
    }
    return cnt;
}

int main() {
    cin >> n >> m >> k;

    for(int i = 1; i <= m; i++) {
        //m个火把的坐标
        cin >> x >> y;
        hb(x, y);
    }

    for(int i = 1; i <= k; i++) {
        cin >> x >> y;
        ys(x, y);
    }

    cout << count() << endl;

    return 0;
}







//umi 3742
#include <iostream>

using namespace std;
 
int n;
char x[500],y[500];
 
int main()
{
    /*
    scanf("%d",&n);
    scanf("%s",x);
    scanf("%s",y);
    */

    cin >> n >> x >> y >> endl;
    
    int flag = 0;

    for(int i=0;i<n;i++)
    {   
        if(y[i] > x[i])
        {
            flag = 1;
            break;
        }
    }

    if(flag) {
        cout << "-1" << endl;
    } else {
        cout << y << endl;
    }
     
    return 0;
}


//1320
#include <stdio.h>

int N, flag, count, temp, total;

int main() {

    for(int i = 0; i < N*N; i++) {
        scanf("%d", &temp);
        if(temp != flag) {
            printf("%d ", count);
            flag = temp;
            count = 1;
        }
        count++;  
    }
    

    while(total--) {
        
    }

    return 0;
}




#include <stdio.h>
#include <string.h>


int main()
{
	int i,n,count=0;
	char str[40000],temp[200];
	int a[40000],len;

    
	while(scanf("%s",temp)!=EOF) {
        strcat(str,temp);
    }
		
	len = strlen(str);
	n = strlen(temp);
	
	for(i = 0; i <= len; i++){
        a[i] = str[i] - '0';
    }
		
	
	if(a[0]==1)
	{
		printf("%d 0 ",n);
		i++;
	}
	else
		printf("%d ",n);
		
	for(i=0;i<len-1;i++)
	{
		if(a[i]==a[i+1])
			count++;
		else
		{
			printf("%d ",++count);
			count=0;
		}
	}
	if(a[len-2]==a[len-1])
		printf("%d",++count);
	else
		printf("1");
	return 0;
}





// 1138
#include <iostream>
#include <cstdio>

using namespace std;

int n, k, temp;
int arr[10005];

int main() {
    scanf("%d %d", &n, &k);
    for(int i = 0; i < n; i++) {
        scanf("%d", &temp);
        arr[temp] = 1;
    }

    for(int i = 0; i < 10005; i++) {
        if(arr[i] != 0) {
            k--;
        }
        if(0 == k) {
            printf("%d\n", i);
            break;
        }
    }

    if(0 != k) {
        printf("NO RESULT\n");
    }

    return 0;
}




// 2550
#include <iostream>
#include <cstdio>
using namespace std;

int n, res[7], cnt, t;
bool win[35];

int main() {
    cin >> n;
    for(int i = 0; i < 7; i++) {
        scanf("%d", &t);
        win[t] = 1;
    }
    
    while(n) {
        cnt = 0;

        for(int i = 0; i < 7; i++) {
            scanf("%d", &t);
            if(win[t] == 1) {
                cnt++;
            }
        }

        if(cnt) {
            res[7-cnt]++;
        }
        
        n--;
    }

    for(int i = 0; i < 7; i++) {
        cout << res[i] << " ";
    }

    return 0;
}